<template>
	<view class="mainpadding">
		<u-parse :content="content"></u-parse>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				type:1,//1用户协议，2隐私政策,3关于我们,4信誉积分规则说明，5问卷规则，6邀请规则
				content:"",
				loading: true
			}
		},
		onLoad(options) {
			this.type = options.type
			if(options.type==1){
				uni.setNavigationBarTitle({
					title:"用户协议"
				})
			}else if(options.type==2){
				uni.setNavigationBarTitle({
					title:"隐私政策"
				})
			}else if(options.type==3){
				uni.setNavigationBarTitle({
					title:"关于我们"
				})
			}else if(options.type==4){
				uni.setNavigationBarTitle({
					title:"信誉积分规则说明"
				})
			}else if(options.type==5){
				uni.setNavigationBarTitle({
					title:"问卷规则"
				})
			}else if(options.type==6){
				uni.setNavigationBarTitle({
					title:"邀请规则"
				})
			}
			
			this.system()
		},
		methods: {
			system(){
				httpRequest.request('/api/index/getConfigInfoItem','GET',{
					pidtype:"about_set",
					type:this.type==1?"user_xy":"user_yszc"
				}).then(res => {
					this.content = res.data
					this.loading = false;
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.loading-style{
	position: absolute;
	width: 91%;
	height: 90%;
	display: flex;
	// justify-content: center;
	// align-items: center;
}
</style>
